#!/bin/bash

###
### timemachine, version 2.0. raptus ag, stf --2012--
###
### important: all settings can be overwritten in the client configs
###

#
# Server-, site- or customer-name
# will be used to seperate mail-notifications from different servers
#
CUSTOMER="somecustomer"

#
# log- and lockdir location
#
LOCKDIR="/var/lock/timemachine"
LOGDIR="/var/log/timemachine"

#
# notify-mail to send backup-reports
#
MAILFROM=""
MAILTO=""

#
# what notify-mails do you need? (specify "on" or "off", empty="off")
# - onsitemail   send a mail after an onsite backup
# - offsitemail  send a mail after an offsite backup 
# - archivemail  send a mail after an archiving job
# - quotaemail   send a mail after an quota check
#
ONSITEMAIL="on"
OFFSITEMAIL="on"
ARCHIVEMAIL="on"
QUOTAEMAIL="on"

#
# file-structure
# - scriptsdir   base directory scripts folder
# - configdir    base directory for the default config
# - mountdir     all mount points of timemachine scripts will be created here
# - backupdir    all data backuped and archived from backup-clients goes here
# - sshfsusr     the user to mount linux clients with sshfs
# - onsitespeed  limits the speed in KByte/sec. "0" to disable (full speed).
#
SCRIPTSDIR="/home/timemachine/scripts"
CONFIGDIR="/home/timemachine/config"
MOUNTDIR="/home/timemachine/mounts"
BACKUPDIR="/home/timemachine/backups"
SSHFSUSR="root"
ONSITESPEED="0"

#
# remote server settings
# - offsitetype  sftp or nfs. sftp depends on pubkey and sshfs-software-packet
# - offsitesrv   remote backup server.
#                nfs:  use "server:/nfs-export-path"
#                sftp: / will be mounted. backup goes to sftpdir.
# - sftpusr      linux user to use for pubkey-auth
# - sftpdir      remote dir to place the backup.
# - sftpspeed    limits the speed in KByte/sec. "0" to disable (full speed). only for sshfs
#
OFFSITETYPE="sftp"
OFFSITESRV=""
SFTPUSR=""
SFTPDIR="/upload"
SFTPSPEED="0"

#
# bigarchive
# - off          archiver source is upload/hostname/jobname
# - on           archiver source is upload/
#
BIGARCHIVE="off"

#
# available disk space for all backups. specify "0" to disable quota.
#
QUOTA="0"

#
# mount options
#
SSHFS_MOUNT_OPTS="ro"
SAMBA_MOUNT_OPTS="ro,iocharset=utf8" 

#
# rsync global parameters
# experts only! changing these paramteres can have unforeseen consequences!
#
# NOTE: without --checksum, rsync will not recognize changes in a file when the 
#       timestamp and the size did not change (i.e. firebird DB file). you can
#       remove this argument if you dont use such files to greatly (around factor 5)
#       improve backup speed. you can also add this argument just for special jobs,
#       by overwritting the following arguments in your job configurtion.
#
RSYNCONSITE="--archive --delete-during --update --stats --verbose --human-readable --checksum"
RSYNCOFFSITE="-rlh --delete-during --update --stats --verbose -h --checksum"
RSYNCARCHIVER="--archive --hard-links --stats --human-readable --verbose --checksum"

#
# rsync nice level
# all rsync jobs (onsite, offsite and archive) will run with this linux nice level.
#
NICELEVEL="18"


#
# default retention periods
# specify "0" (zero) in order to skip the corresponding retention 
# - daily     Number of days from today to keep
# - weekly    Number of weeks from today to keep
# - monthly   Number of months from today to keep
# - yearly    Number of years from today to keep
#
RETENTION_DAILY="30"
RETENTION_WEEKLY="8"
RETENTION_MONTHLY="11"
RETENTION_YEARLY="1"

# eof
